<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition>

            <div id="post">

                <h3>Cadastro de Turma</h3>

                <div id="stylized" class="myform">


                    <h:outputLabel>Disciplina: <span class="small">Selecionar Disciplina</span></h:outputLabel>
                    <h:selectOneMenu id="disciplinaProfessor" value="#{TurmaController.disciplinaProfessor}">
                        <f:selectItems value="#{DisciplinaProfessorController.disciplinaProfessorLogado}" var="discipliaProfessorTemp" itemLabel="#{discipliaProfessorTemp.disciplina.nome}" />
                        <f:ajax event="change" render="descricao" />
                    </h:selectOneMenu>

                    <h:outputLabel>Descrição: <span class="small">Descrição da disciplina</span></h:outputLabel>
                    <h:inputTextarea value="#{TurmaController.disciplinaProfessor.descricao}" id="descricao" disabled="true">
                    </h:inputTextarea>

                    <h:outputLabel>Turma: <span class="small">Nome da Turma</span></h:outputLabel>
                    <h:inputText value="#{TurmaController.turma.nome}" id="turmaNome"></h:inputText>


                    <ui:include src="../plano/planoCad.xhtml" id="planoCad" />


                    <h:commandButton styleClass="button" id="salvarTurma" action="#{TurmaController.persiste}" value="Salvar" />
                    <h:commandButton styleClass="button" type="reset" value="Limpar" />

                </div>
            </div>
        </ui:composition>

    </body>
</html>
